package ae.pcfc.etks.online.common.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ProcStepsComnts entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_PROC_STEPS_COMNTS", schema = "ETKS_ONLINE_DBA")
@SequenceGenerator(name = "SQ_ETKS_PROC_STP_CMNT", sequenceName = "SQ_ETKS_PROC_STP_CMNT", initialValue = 1, allocationSize = 1)
public class ProcStepsComnts implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long commentId;
	private AppMetaData AppMetaData;
	private ProcessStep ProcessStep;
	private String commentBy;
	private Date commentDate;
	private String commentDesc;
	private String commentUserDesc;
	private String text1;
	private String text2;
	private String text3;
	private Date date1;
	private Date date2;
	private Date date3;

	public ProcStepsComnts() {
	}

	public ProcStepsComnts(Long commentId,
			ProcessStep ProcessStep, String commentBy) {
		this.commentId = commentId;
		this.ProcessStep = ProcessStep;
		this.commentBy = commentBy;
	}

	public ProcStepsComnts(Long commentId,
			AppMetaData AppMetaData,
			ProcessStep ProcessStep, String commentBy,
			Date commentDate, String commentDesc, String commentUserDesc, String text1, String text2,
			String text3, Date date1, Date date2, Date date3) {
		this.commentId = commentId;
		/*this.AppMetaData = AppMetaData;*/
		
		this.ProcessStep = ProcessStep;
		this.commentBy = commentBy;
		this.commentDate = commentDate;
		this.commentDesc = commentDesc;
		this.commentUserDesc = commentUserDesc;
		this.text1 = text1;
		this.text2 = text2;
		this.text3 = text3;
		this.date1 = date1;
		this.date2 = date2;
		this.date3 = date3;
	}

	@Id
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_ETKS_PROC_STP_CMNT")
	@Column(name = "COMMENT_ID", unique = true, nullable = false, length = 10)
	public Long getCommentId() {
		return this.commentId;
	}

	public void setCommentId(Long commentId) {
		this.commentId = commentId;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "APPLICATION_ID")
	public AppMetaData getAppMetaData() {
		return this.AppMetaData;
	}

	public void setAppMetaData(AppMetaData AppMetaData) {
		this.AppMetaData = AppMetaData;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "PROCESS_STEP_CODE", referencedColumnName = "PROCESS_STEP_CODE", nullable = false),
			@JoinColumn(name = "PROCESS_CODE", referencedColumnName = "PROCESS_CODE", nullable = false) })
	public ProcessStep getProcessStep() {
		return this.ProcessStep;
	}

	public void setProcessStep(ProcessStep ProcessStep) {
		this.ProcessStep = ProcessStep;
	}

	@Column(name = "COMMENT_BY", nullable = false, length = 50)
	public String getCommentBy() {
		return this.commentBy;
	}

	public void setCommentBy(String commentBy) {
		this.commentBy = commentBy;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "COMMENT_DATE", length = 7)
	public Date getCommentDate() {
		return this.commentDate;
	}

	public void setCommentDate(Date commentDate) {
		this.commentDate = commentDate;
	}

	@Column(name = "COMMENT_DESC", length = 300)
	public String getCommentDesc() {
		return this.commentDesc;
	}

	public void setCommentDesc(String commentDesc) {
		this.commentDesc = commentDesc;
	}
	
	@Column(name = "COMMENT_USER_DESC", length = 300)
	public String getCommentUserDesc() {
		return commentUserDesc;
	}

	public void setCommentUserDesc(String commentUserDesc) {
		this.commentUserDesc = commentUserDesc;
	}

	@Column(name = "TEXT1", length = 200)
	public String getText1() {
		return this.text1;
	}

	public void setText1(String text1) {
		this.text1 = text1;
	}

	@Column(name = "TEXT2", length = 200)
	public String getText2() {
		return this.text2;
	}

	public void setText2(String text2) {
		this.text2 = text2;
	}

	@Column(name = "TEXT3", length = 200)
	public String getText3() {
		return this.text3;
	}

	public void setText3(String text3) {
		this.text3 = text3;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE1", length = 7)
	public Date getDate1() {
		return this.date1;
	}

	public void setDate1(Date date1) {
		this.date1 = date1;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE2", length = 7)
	public Date getDate2() {
		return this.date2;
	}

	public void setDate2(Date date2) {
		this.date2 = date2;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE3", length = 7)
	public Date getDate3() {
		return this.date3;
	}

	public void setDate3(Date date3) {
		this.date3 = date3;
	}

}
